package com.yao.club.controller.goods;


import com.yao.club.entity.dto.GoodsBrand;
import com.yao.club.entity.dto.MallGoodsInfo;
import com.yao.club.entity.dto.MallHotWords;
import com.yao.club.entity.dto.MallOrderNearly;
import com.yao.club.entity.request.MallGoodsSearchRequest;
import com.yao.club.entity.result.ResponseEntity;
import com.yao.club.entity.result.ResultEntity;
import com.yao.club.entity.vo.GoodsDetailVO;
import com.yao.club.entity.vo.MallSearchSuggestionVO;
import com.yao.club.service.GoodsDetailService;
import com.yao.club.service.MallSearchService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@Api(tags = "俱乐部商城-商品详情")
@RestController
@RequestMapping("/mall/goodsDetail")
public class GoodsDetailController {
    @Autowired
    private GoodsDetailService goodsDetailService;


    @ApiOperation(value = "获取商品详情")
    @GetMapping("/mallGoodsInfoInfo/{goodsId}")
    @ApiImplicitParam(name = "goodsId", value = "商品ID", required = true, dataType = "Long")
    public ResponseEntity<GoodsDetailVO> mallGoodsInfoInfo(@PathVariable Long goodsId) {
        return goodsDetailService.getGoodsDetail(goodsId);
    }

    /**
     * 推荐产品信息
     */
    @ApiOperation(value = "商品详情-推荐产品信息")
    @GetMapping("/mallGoodsListRecommend")
    @ApiImplicitParams({
            @ApiImplicitParam(name="goods_id",value="商品id",required=true,dataType="String")
    })
    ResponseEntity<List<MallGoodsInfo>> mallGoodsListRecommend(String goods_id){
        return goodsDetailService.mallGoodsListRecommend();
    }


    /**
     * 下单情况
     */
    @ApiOperation(value = "商品详情-下单情况")
    @GetMapping("/orderGoodsSubmitSuccess")
    @ApiImplicitParams({
            @ApiImplicitParam(name="goods_id",value="商品id",required=true,dataType="String")
    })
    ResponseEntity<List<MallOrderNearly>> orderGoodsSubmitSuccess(String goods_id){
        return goodsDetailService.orderGoodsSubmitSuccess();
    }

}
